package com.ruoyi.project.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.mapper.PatrolRecordMapper;
import com.ruoyi.project.system.domain.PatrolRecord;
import com.ruoyi.project.system.service.IPatrolRecordService;

/**
 * 巡查记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-10-15
 */
@Service
public class PatrolRecordServiceImpl implements IPatrolRecordService 
{
    @Autowired
    private PatrolRecordMapper patrolRecordMapper;

    /**
     * 查询巡查记录
     * 
     * @param id 巡查记录主键
     * @return 巡查记录
     */
    @Override
    public PatrolRecord selectPatrolRecordById(Long id)
    {
        return patrolRecordMapper.selectPatrolRecordById(id);
    }

    /**
     * 查询巡查记录列表
     * 
     * @param patrolRecord 巡查记录
     * @return 巡查记录
     */
    @Override
    public List<PatrolRecord> selectPatrolRecordList(PatrolRecord patrolRecord)
    {
        return patrolRecordMapper.selectPatrolRecordList(patrolRecord);
    }

    /**
     * 新增巡查记录
     * 
     * @param patrolRecord 巡查记录
     * @return 结果
     */
    @Override
    public int insertPatrolRecord(PatrolRecord patrolRecord)
    {
        return patrolRecordMapper.insertPatrolRecord(patrolRecord);
    }

    /**
     * 修改巡查记录
     * 
     * @param patrolRecord 巡查记录
     * @return 结果
     */
    @Override
    public int updatePatrolRecord(PatrolRecord patrolRecord)
    {
        return patrolRecordMapper.updatePatrolRecord(patrolRecord);
    }

    /**
     * 批量删除巡查记录
     * 
     * @param ids 需要删除的巡查记录主键
     * @return 结果
     */
    @Override
    public int deletePatrolRecordByIds(Long[] ids)
    {
        return patrolRecordMapper.deletePatrolRecordByIds(ids);
    }

    /**
     * 删除巡查记录信息
     * 
     * @param id 巡查记录主键
     * @return 结果
     */
    @Override
    public int deletePatrolRecordById(Long id)
    {
        return patrolRecordMapper.deletePatrolRecordById(id);
    }
}
